package com.bw.dg.service.impl;

import com.bw.dg.dao.LogDao;
import com.bw.dg.dao.PeopleMapper;
import com.bw.dg.pojo.Log;
import com.bw.dg.pojo.People;
import com.bw.dg.service.PeopleService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.Date;
import java.util.List;

/**
 * @ClassName PeopleServiceImpl
 * @Description TODO
 * @Author 赫含星
 * @Date 2020/4/20 17:35
 * @Version 1.0
 **/
@Service
@Transactional
public class PeopleServiceImpl implements PeopleService {
    @Autowired
    private PeopleMapper peopleMapper;
    @Autowired
    private LogDao logDao;
    @Override
    public List findAll() {
        return peopleMapper.findAll();
    }

    @Override
    public People findPeopleByid(String id) {
        return peopleMapper.findPeopleByid(id);
    }

    @Override
    public void addPeople(People people) {


        peopleMapper.addPeople(people);
    }

    @Override
    public void delete(String id) {
          this.peopleMapper.delete(id);
    }

    @Override
    public List findName(String name) {
        return peopleMapper.findName(name);
    }

    @Override
    public List<People> peopleList() {
        return peopleMapper.peopleList();
    }

    @Override
    public void update(People people) {
        peopleMapper.update(people);
    }


}
